# -*- coding:utf-8 -*-
import tree
import draw
import json

fr = open(file='watermelon.txt', encoding='utf-8')

listWm = [inst.strip().split(' ') for inst in fr.readlines()]
labels = ['色泽', '根蒂', '敲声', '纹理', '脐部', '触感']
Trees = tree.create_tree(listWm, labels)

print(Trees)

draw.draw_tree(Trees)
